var playtime=setInterval(play,3000);
var sp_box=document.getElementById("sp_box");
var sp_pics=sp_box.getElementsByTagName("div")[0];
var sp_list=sp_box.getElementsByTagName("div")[0].getElementsByTagName("ul")[0].getElementsByTagName("li");
var piclen = sp_list.length;
var pre=sp_box.getElementsByTagName("div")[1].getElementsByTagName("a")[0];
var next=sp_box.getElementsByTagName("div")[1].getElementsByTagName("a")[1];
var count=0;
//播放
function play(){
	
	if(count==piclen){
	sp_list[count-1].style.left="980px";
	count=0;
	sp_list[count].style.left="0px";
	}
	sp_list[count].style.left="0px";
	if(0<count){
	sp_list[count-1].style.left="980px";
	}
	count++;

	if(window.addEventListener){
	sp_pics.addEventListener("mouseover",mouseov);
	sp_pics.addEventListener("mouseout",mouseou);
	}else{
	sp_pics.attachEvent("mouseover",mouseov);
	sp_pics.attachEvent("mouseout",mouseou);
	}
}
//监听鼠标事件
function mouseov(){
	clearInterval(playtime);
}
function mouseou(){
		playtime=setInterval(play,3000);
		}
//监听键盘事件
//左按钮
function gopre(){

}
//右按钮
function gonext(){
alert("next");
}
//menu功能
function menufun(){
alert("menufun");
}

